home *** CD-ROM | disk | FTP | other *** search
- Path: gryphon.phoenix.net!usenet
- From: brucew@phoenix.net (Bruce Wedding)
- Newsgroups: comp.lang.c
- Subject: Re: Help: crash when doing fprintf
- Date: Tue, 16 Jan 1996 01:35:07 GMT
- Organization: BranPaul Systems
- Message-ID: <4det25$rpp@gryphon.phoenix.net>
- References: <DL74rA.L5v@info.physics.utoronto.ca>
- NNTP-Posting-Host: dial35.phoenix.net
- X-Newsreader: Moe's Newsreader
-
- olivers@helios.physics.utoronto.ca (Oliver Schonborn) wrote:
-
- > printf("Outputting to %s...\n",fout);
- > fp=fopen(fout,"w");
- > fprintf(fp,"Hello\n");
-
- >This is what fp points to at crash time:
-
- >0x40001038 struct FILE {
- > __cnt = 0;
- > __ptr = 00000000;
- > __base = 00000000;
-
- Judging from these values, you are printing to a null pointer. Have
- you checked to see if the file opened, because you aren't in this
- code.
-
-
- Bruce D. Wedding Have Compiler, Will Travel!
- Perspicacious Programming Performed Promptly
- Katy, Texas, USA, Planet Earth, Milkyway Galaxy, Known Universe
-
-